<template>
  <el-select v-model="value">
    <el-option :label="selectedLabel" :value="selectedValue">
      <el-tree :data="optionsData" :props="optionsProp"></el-tree>
    </el-option>
  </el-select>
</template>

<script>
export default {
  name: 'EpSelectTree',
  props: {
    value: {
      type: String,
      required: true
    },
    optionsData: {
      type: Array,
      required: true
    },
    optionsProp: {
      type: Object,
      default () {
        return {
          value: 'value',
          label: 'label',
          children: 'children'
        }
      }
    }
  },
  data () {
    return {
      selectedLabel: '',
      selectedValue: ''
    }
  }
}
</script>

<style scoped>

</style>
